package com.itdaan.portal.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.itdaan.portal.business.domain.UserRole;
import com.itdaan.portal.business.mapper.UserRoleMapper;
import com.itdaan.portal.business.service.UserRoleService;
/**
 * @author www.itdaan.com
 */
@Service(value = "userRoleService")
public class UserRoleServiceImpl implements UserRoleService {
	
	@Autowired
	private UserRoleMapper userRoleMapper;
	
	public void insert(UserRole userRole) {
		userRoleMapper.insert(userRole);
	}

	public void deleteByUserId(int userId) {
		userRoleMapper.deleteByUserId(userId);
	}

	public List<UserRole> getByUserId(int userId) {
		return userRoleMapper.getByUserId(userId);
	}

}
